package com.example.pointboot.controller;

import com.example.pointboot.pojo.Point;
import com.example.pointboot.service.PointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Authther: mrwu
 * @date:2021/6/7-06
 * @Description:com.example.pointboot.controller
 */
@RestController
public class PointController {
    @Autowired
    PointService pointService;

    @Transactional
    @GetMapping("/point")
    public void createpoint(){
        Point point = new Point();
        point.setCount(10);
        pointService.saveOrUpdate(point);
    }
}
